Skip to content

Feature: metadata_scan supports checking the metadata of index table now #21800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 19, 2025

Conversation

Cabbage74
Copy link
Contributor

@Cabbage74 Cabbage74 commented May 8, 2025

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #21785

What this PR does / why we need it:

MO without this PR

metadata_scan currently only supports scanning regular tables.
For example, let's say there is a database named cabbage ,a table named user, and an index named idx_username which corresponds to the table __mo_index_unique_0196a9ae-33d9-7308-9d57-8a593fc55dbf.
We can check the metadata of user as follows.
1
But we can't check the metadata of index tables even if we know the system-generated name of the index table.
2

MO with this PR

Now we can easily check the metadata of an index table by grammar metadata_scan("db_name.table_name.?index_name", "col_name")g;
3

After review

The current grammar is metadata_scan("db_name.table_name.?index_name", "col_name")g;

Copy link
Contributor

@XuPeng-SH XuPeng-SH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add unit test to parse "db.table.$indexname" with many patterns

@mergify mergify bot merged commit fcc5b27 into matrixorigin:main May 19, 2025
18 checks passed
XuPeng-SH added a commit that referenced this pull request May 21, 2025
…able (#21872)

## What type of PR is this?

- [ ] API-change
- [ ] BUG
- [ ] Improvement
- [ ] Documentation
- [x] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

issue #21785

## What this PR does / why we need it:
Same as PR #21800

---------

Co-authored-by: XuPeng-SH <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature size/M Denotes a PR that changes [100,499] lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants